From: Keir Fraser Date: Tue, 31 Mar 2009 10:17:51 +0000 (+0100) Subject: pygrub: More accurate try/except catch. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13989^2~70 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6fe255bdc2edb6a26326f6532908ffebbf69336a;p=xen.git pygrub: More accurate try/except catch. Signed-off-by: Michal Novotny --- diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub index ba70832e62..561bc7efe9 100644 --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -532,7 +532,7 @@ def run_grub(file, entry, fs, arg): try: img = g.cf.images[sel] - except: + except IndexError: log.debug("PyGrub: Default selection is not valid, using first boot configuration...") img = g.cf.images[0]